<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <title>软件分类-软件下载|教程下载|科学软件|专业软件|共享软件|使用教程|项目咨询|数值模拟</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="软件下载|教程下载|科学软件交流组|专业软件|行业软件|水利软件|环境软件|数学软件|仿真软件|结构软件|机械软件|建筑软件|设计软件|优化软件|电力软件|信息软件|生物软件|预警软件|岩土软件|流体软件|后处理软件|BIM软件|化学软件|飞行器软件|交通软件|车辆软件|地质软件|医学软件|勘测软件|编程软件|常用工具|数值模拟|安装服务|培训服务|项目咨询服务|水利环境市政">
    <meta name="author" content="idemon">

    <!-- The styles -->
    <link id="bs-css" href="${contextPath!}css/bootstrap-cerulean.min.css" rel="stylesheet">
    <link href="${contextPath!}css/charisma-app.css" rel="stylesheet">
	<link href='${contextPath!}css/jquery.iphone.toggle.css' rel='stylesheet'>
    <!-- jQuery -->
	
    <script src="${contextPath!}bower_components/jquery/jquery.min.js"></script>
	
    <!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- The fav icon -->
    <link rel="shortcut icon" href="${contextPath!}img/favicon.ico">
    
	<style type="text/css">
    div.toolong{
		overflow: hidden; 
		white-space: nowrap; 
		text-overflow: ellipsis;
		width:250px;
	}
	div.toolong2{
		overflow: hidden; 
		white-space: nowrap; 
		text-overflow: ellipsis;
		width:180px;
	}
    </style>
</head>

<body>
    <!-- topbar starts -->
    <div class="navbar navbar-default" role="navigation">

        <div class="navbar-inner">
            <a class="navbar-brand" href="${contextPath!}"> <img alt="Logo" src="${contextPath!}img/logo20.png" class="hidden-xs"/>
                <span>首页</span></a>

            <!-- user dropdown starts -->
			<#if SESSION_USER?? >
			<div class="btn-group pull-right">
				<button class="btn btn-default dropdown-toggle"
					data-toggle="dropdown">
					<i class="glyphicon glyphicon-user"></i><span
						class="hidden-sm hidden-xs">${SESSION_USER.name}</span> <span class="caret"></span>
				</button>
				<ul class="dropdown-menu">
					<li><a href="/usercenter/pdetail">个人中心</a></li>
					<li><a href="#" onclick="run1();">修改密码</a></li>
					<li class="divider"></li>
					<li><a href="/account/logout">退出</a></li>
				</ul>
			</div>
			<#else>
			<div class="btn-group pull-right">
				<button class="btn btn-default dropdown-toggle"
					data-toggle="dropdown" onclick="location.href='/account'">
					<i class="glyphicon glyphicon-user"></i><span
						class="hidden-sm hidden-xs">请登陆</span> <span class="caret"></span>
				</button>
			</div>
			</#if>
			<!-- user dropdown ends -->

            <ul class="collapse navbar-collapse nav navbar-nav top-menu">
                <li class="dropdown">
                    <a href="#" data-toggle="dropdown"><i class="glyphicon glyphicon-star"></i> 软件 <span
                            class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu">
                    	<#list initCategoryList! as x>
                        <li><a href="/category/1-${x.cid!}">${x.name!}</a></li>
                        </#list>
                    </ul>
                </li>
				<li class="dropdown">
                    <a href="#" data-toggle="dropdown"><i class="glyphicon glyphicon-leaf"></i> 教程 <span
                            class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu">
                    	<#list initCategoryList! as x>
                        <li><a href="/category/2-${x.cid!}">${x.name!}教程</a></li>
                        </#list>
                    </ul>
                </li>
				<li><a href="javascript:run3();"><i class="glyphicon glyphicon-envelope"></i> 咨询 </a></li>
                <li>
                    <form action="/search" method="post" class="navbar-search pull-left">
						<input placeholder="Search"
							class="search-query form-control col-md-10" name="key"
							type="text">
					</form>
                </li>
            </ul>

        </div>
    </div>
    <!-- topbar ends -->
<div class="ch-container">
    <div class="row">
        <div id="content" class="col-lg-9 col-sm-9">
            <!-- content starts -->
        <div>
			<ul class="breadcrumb">
				<li>
					<a href="/index">首页</a>
				</li>
				<#if (typeandcate.typeName)??>
				<li>
					<a href="#">${typeandcate.typeName!}</a>
				</li>
				</#if>
				<#if (typeandcate.cname)??>
				<li>
					<a href="#">${typeandcate.cname!}</a>
				</li>
				</#if>
			</ul>
		</div>

	<div class="row">
        <div class="box col-md-12">
            <div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2><i class="glyphicon glyphicon-star-empty"></i> &nbsp;&nbsp;${typeandcate.cname!}</h2>
					<div class="box-icon">
						<a href="#" class="btn btn-minimize btn-round btn-default"><i
                            class="glyphicon glyphicon-chevron-up"></i></a>
					</div>
                </div>
                <div class="box-content">
                    <table class="table">
                        <thead>
                        <tr>
                            <th colspan="2">软件名称</th>
							<th>软件简介</th>
                            <th>更新时间</th>
							<th>金币</th>
                        </tr>
                        </thead>
                        <tbody>
                        <#list pageData.getList() as x>
                        <tr>
                            <td class="col-md-1"><a href="/detail/${x.sid!}"><img src="${contextPath!}images/${x.logo!}" width="40" height="40"/></a></td>
                            <td class="col-md-2"><h5><a href="/detail/${x.sid!}">${x.name!}</a></h5></td>
							<td class="center col-md-6"><h5>${x.mini_desc!}</h5></td>
							<td class="center col-md-2"><h5>${x.modify_date?date}</h5></td>
							<td class="center col-md-1"><h5>${x.curr_price!}</h5></td>
                        </tr>
                        </#list>
                        </tbody>
                    </table>
                    
                </div>
            </div>
        </div>
        <!--/span-->
    </div><!--/row-->
    <!-- content ends -->
    </div><!--/#content.col-md-0-->
	
	<div class="box col-md-3">
            <div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2>最新软件排行榜</h2>
                </div>
                <div id="newdata" class="box-content">
                </div>
            </div>
        </div>
	
	<div class="box col-md-3">
            <div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2>软件下载排行榜</h2>
                </div>
                <div id="maxdown" class="box-content">
                </div>
            </div>
        </div>
</div><!--/fluid-row-->
    <hr>
    <!--buy software starts-->
	<div class="hide">
		<div id="buysoftware">
			<div class="form-group modal-body">
				<img alt="微信" src="/img/weixin.jpg" width="200" height="200"/>
				<img style="float:right" alt="QQ" src="/img/qq.png" width="200" height="200"/>
			</div>
		</div>
	</div>
  <!--buy software ends-->
	<!--modify password starts-->
		<div class="hide">
			<div id="modifypassword">
				<form id="loginform">
					<div class="form-group">
						<label for="password">原密码</label> <input name="orgpass" type="password"
							class="form-control" id="password">
					</div>
					<div class="form-group">
						<label for="password">新密码</label> <input name="newpass" type="password"
							class="form-control" id="password">
					</div>
					<div class="form-group">
						<label for="password">重复新密码</label> <input name="repass" type="password"
							class="form-control" id="password">
					</div>
				</form>
			</div>
		</div>
		<!--modify password ends-->
<footer class="row">
        <p class="col-md-9 col-sm-9 col-xs-12 copyright">&copy; <a href="http://www.idemon.com.cn/" target="_blank">idemon</a> 2015 - 2017</p>
        <p class="col-md-3 col-sm-3 col-xs-12 powered-by">Powered by: <a href="http://www.idemon.com.cn/">Idemon</a></p>
    </footer>
</div><!--/.fluid-container-->

<!-- external javascript -->
<script src="${contextPath!}bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- library for cookie management -->
<script src="${contextPath!}js/jquery.cookie.js"></script>
<!-- calender plugin -->
<script src='${contextPath!}bower_components/moment/min/moment.min.js'></script>
<script src='${contextPath!}bower_components/fullcalendar/dist/fullcalendar.min.js'></script>
<!-- data table plugin -->
<script src='${contextPath!}js/jquery.dataTables.min.js'></script>
<!-- select or dropdown enhancer -->
<script src="${contextPath!}bower_components/chosen/chosen.jquery.min.js"></script>
<!-- plugin for gallery image view -->
<script src="${contextPath!}bower_components/colorbox/jquery.colorbox-min.js"></script>
<!-- star rating plugin -->
<script src="${contextPath!}js/jquery.raty.min.js"></script>
<!-- for iOS style toggle switch -->
<script src="${contextPath!}js/jquery.iphone.toggle.js"></script>
<!-- autogrowing textarea plugin -->
<script src="${contextPath!}js/jquery.autogrow-textarea.js"></script>
<!-- multiple file upload plugin -->
<script src="${contextPath!}js/jquery.uploadify-3.1.min.js"></script>
<!-- history.js for cross-browser state change on ajax -->
<script src="${contextPath!}js/jquery.history.js"></script>
<!-- application script for  demo -->
<script src="${contextPath!}js/charisma.js"></script>
<!-- dialog -->
<script src="${contextPath!}js/jquery.bootstrap.min.js"></script>
<script>
//修改密码   开始
function run1() {
	$("#modifypassword").dialog({
		title : "修改密码",
		'class' : "mydialog" /*add custom class for this dialog*/
		,
		onClose : function() {
			$(this).dialog("close");
		},
		buttons : [ {
			text : "关闭",
			'class' : "btn btn-default",
			click : function() {
				$(this).dialog("close");
			}
		}, {
			text : "提交",
			'class' : "btn btn-primary",
			click : function() {
				/*your login handler*/
				$thisdialog = $(this);
				$("#errormsg").remove();
				$.post("/usercenter/updpass", $("#loginform").serialize(),function(json){
			     	if(json.code == 0){
			     		$("#loginform").prepend($("<div></div>").attr("id","errormsg").addClass("alert alert-danger").text(json.msg));
			     	}else if(json.code == 1){
			     		$thisdialog.dialog("close");
			     	}else{
			     		$thisdialog.dialog("close");
			     	}
			    });
			}
		} ]
	});
}
//修改密码   结束
	//弹出微信QQ start
	function run3(){
      $("#buysoftware").dialog({
          title:    "请加微信或QQ联系我们"
        , 'class':  "mydialog"  /*add custom class for this dialog*/
        , onClose: function() { $(this).dialog("close"); }
      });
	}
	//弹出微信QQ end
	//最新软件排行榜
	function initMaxdown(){
		$.getJSON("/init/maxdown", function(json){
			 $.each(json, function(i,item){
				 $rowdiv = $("<div></div>").addClass("row");
				 $coldiv = $("<div></div>").addClass("col-md-12");
				 $ahref = $("<a></a>").attr("href","/detail/" + item.sid);
				 $toolongdiv = $("<div data-placement='left' data-toggle='tooltip'></div>").attr("title",item.name).addClass("toolong").text((i + 1) +"."+item.name);
				 $("#maxdown").append($rowdiv.append($coldiv.append($("<h6></h6>").append($ahref.append($toolongdiv)))));
			});
		});
	}
	//软件下载排行榜
	function intiNewdata(){
		$.getJSON("/init/newdata", function(json){
			 $.each(json, function(i,item){
				 $rowdiv = $("<div></div>").addClass("row");
				 $coldiv = $("<div></div>").addClass("col-md-12");
				 $ahref = $("<a></a>").attr("href","/detail/" + item.sid);
				 $toolongdiv = $("<div data-placement='left' data-toggle='tooltip'></div>").attr("title",item.name).addClass("toolong").text((i + 1) +"."+item.name);
				 $("#newdata").append($rowdiv.append($coldiv.append($("<h6></h6>").append($ahref.append($toolongdiv)))));
			});
		});
	}
	
	$(function($) {
		//最新软件排行榜
		initMaxdown();
		//软件下载排行榜
		intiNewdata();
	});
<!--
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":["fbook","twi","linkedin","evernotecn","mshare","tqq","renren","kaixin001","tieba","ty","douban","sqq","huaban","bdysc","bdxc","tqf","bdhome","thx","ibaidu","meilishuo","mogujie","diandian","duitang","hx","fx","youdao","sdo","qingbiji","people","xinhua","mail","isohu","yaolan","wealink","iguba","h163"],"bdPic":"","bdStyle":"0","bdSize":"32"},"share":{},"image":{"viewList":["weixin","tsina","qzone","print","copy"],"viewText":"分享到：","viewSize":"24"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["weixin","tsina","qzone","print","copy"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
//-->
</script>
</body>
</html>
